<?php
namespace Home\Model;
use Think\Model\ViewModel;

class RecommendViewModel extends ViewModel
{
    public $viewFields = array(

        'recommended' => array(
            '*', '_type' => 'LEFT'
        ),
        'agent' => array(
            'agent_name', 'rank_id','u_status','invitation_code','mobile',
            '_on' => 'agent.agent_id = recommended.beadd_agent' ,
            '_type' => 'LEFT'
        ),
        'agent_info' => array(
            'avatar',
            '_on' => 'agent_info.agent_id = recommended.beadd_agent' ,
            '_type' => 'LEFT'
        ),
        'agent_rank' => array(
            'rank_name',
            '_on' => 'agent_rank.rank_id = agent.rank_id' ,
            '_type' => 'LEFT'
        ),
    );
}